package com.define.commons.quartz.domain;

import com.define.commons.dao.domain.BaseModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 执行任务
 * @Author xiewenlong
 * @Date 2018/11/20 14:19
 */
@Data
@Entity
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(schema = "dy_zwsp", name = "qrtz_task")
@ToString(callSuper = true)
public class Task extends BaseModel {

    /** 工作名称 */
    @Column(name = "job_name", columnDefinition = "varchar(50) Comment '工作名称'", length = 50)
    @ApiModelProperty(value = "工作名称", required = true)
    private String jobName;
    /** 工作组名称 */
    @ApiModelProperty("工作组名称")
    @Column(name = "job_group_name", columnDefinition = "varchar(50) Comment '工作组名称'", length = 50)
    private String jobGroupName;
    /** 触发器名称 */
    @ApiModelProperty("触发器名称")
    @Column(name = "trigger_name", columnDefinition = "varchar(50) Comment '触发器名称'")
    private String triggerName;
    /** 触发器组名称 */
    @ApiModelProperty("触发器组名称")
    @Column(name = "trigger_group_name", columnDefinition = "varchar(50) Comment '触发器组名称'")
    private String triggerGroupName;
    /** 执行类 */
    @ApiModelProperty(value = "执行类完全限定名", required = true)
    @Column(name = "clazz", columnDefinition = "varchar(255) Comment '执行类完全限定名'")
    private String clazz;
    /** corn执行表达式 */
    @ApiModelProperty(value = "cronExpression表达式", required = true)
    @Column(name = "cron_expression", columnDefinition = "varchar(50) Comment 'cronExpression表达式'")
    private String cronExpression;
    /** 执行参数 */
    @ApiModelProperty("执行参数")
    @Column(name = "param", columnDefinition = "varchar(50) Comment '执行参数'")
    private String param;
    /** 执行状态 */
    @ApiModelProperty("执行状态")
    @Column(name = "status", columnDefinition = "varchar(50) Comment '执行状态'")
    private String status;
    /** 备注 */
    @ApiModelProperty("备注")
    @Column(name = "remark", columnDefinition = "varchar(255) Comment '备注'")
    private String remark;

}
